package com.fable.biz.operate.impl;

import com.fable.biz.operate.FileRecordService;
import com.fable.dal.mapper.ext.FileRecordExtMapper;
import com.fable.dal.model.FileRecordDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by weishuai on 18/6/4.
 */
@Service("fileRecordService")
public class FileRecordServiceImpl implements FileRecordService {
    @Autowired
    FileRecordExtMapper fileRecordExtMapper;

    @Override
    public int add(FileRecordDO fileRecordDO) {
        return fileRecordExtMapper.insertSelective(fileRecordDO);
    }

    @Override
    public void update(FileRecordDO fileRecordDO) {
         fileRecordExtMapper.updateByPrimaryKeySelective(fileRecordDO);
    }

    @Override
    public FileRecordDO getById(Long id) {
        return fileRecordExtMapper.selectByPrimaryKey(id);
    }
}
